Optimal. Leaf size=97 \[ -\frac {b f x}{2 d}-\frac {b (d e+f-c f) (d e-(1+c) f) \text {ArcTan}(c+d x)}{2 d^2 f}+\frac {(e+f x)^2 (a+b \text {ArcTan}(c+d x))}{2 f}-\frac {b (d e-c f) \log \left (1+(c+d x)^2\right )}{2 d^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 97, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {5155, 4972,
716, 649, 209, 266} \begin {gather*} \frac {(e+f x)^2 (a+b \text {ArcTan}(c+d x))}{2 f}-\frac {b \text {ArcTan}(c+d x) (-c f+d e+f) (d e-(c+1) f)}{2 d^2 f}-\frac {b (d e-c f) \log \left ((c+d x)^2+1\right )}{2 d^2}-\frac {b f x}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 266
Rule 649
Rule 716
Rule 4972
Rule 5155
Rubi steps
\begin {align*} \int (e+f x) \left (a+b \tan ^{-1}(c+d x)\right ) \, dx &=\frac {\text {Subst}\left (\int \left (\frac {d e-c f}{d}+\frac {f x}{d}\right ) \left (a+b \tan ^{-1}(x)\right ) \, dx,x,c+d x\right )}{d}\\ &=\frac {(e+f x)^2 \left (a+b \tan ^{-1}(c+d x)\right )}{2 f}-\frac {b \text {Subst}\left (\int \frac {\left (\frac {d e-c f}{d}+\frac {f x}{d}\right )^2}{1+x^2} \, dx,x,c+d x\right )}{2 f}\\ &=\frac {(e+f x)^2 \left (a+b \tan ^{-1}(c+d x)\right )}{2 f}-\frac {b \text {Subst}\left (\int \left (\frac {f^2}{d^2}+\frac {(d e-f-c f) (d e+f-c f)+2 f (d e-c f) x}{d^2 \left (1+x^2\right )}\right ) \, dx,x,c+d x\right )}{2 f}\\ &=-\frac {b f x}{2 d}+\frac {(e+f x)^2 \left (a+b \tan ^{-1}(c+d x)\right )}{2 f}-\frac {b \text {Subst}\left (\int \frac {(d e-f-c f) (d e+f-c f)+2 f (d e-c f) x}{1+x^2} \, dx,x,c+d x\right )}{2 d^2 f}\\ &=-\frac {b f x}{2 d}+\frac {(e+f x)^2 \left (a+b \tan ^{-1}(c+d x)\right )}{2 f}-\frac {(b (d e-c f)) \text {Subst}\left (\int \frac {x}{1+x^2} \, dx,x,c+d x\right )}{d^2}-\frac {(b (d e+f-c f) (d e-(1+c) f)) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,c+d x\right )}{2 d^2 f}\\ &=-\frac {b f x}{2 d}-\frac {b (d e+f-c f) (d e-(1+c) f) \tan ^{-1}(c+d x)}{2 d^2 f}+\frac {(e+f x)^2 \left (a+b \tan ^{-1}(c+d x)\right )}{2 f}-\frac {b (d e-c f) \log \left (1+(c+d x)^2\right )}{2 d^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.05, size = 163, normalized size = 1.68 \begin {gather*} a e x+\frac {1}{2} a f x^2+b e x \text {ArcTan}(c+d x)+\frac {b f \left (\frac {1}{2} d \left (-\frac {c}{d}+\frac {c+d x}{d}\right )^2 \text {ArcTan}(c+d x)-\frac {1}{2} d \left (\frac {x}{d}-\frac {i (i-c)^2 \log (i-c-d x)}{2 d^2}+\frac {i (i+c)^2 \log (i+c+d x)}{2 d^2}\right )\right )}{d}-\frac {b e \left (-2 c \text {ArcTan}(c+d x)+\log \left (1+c^2+2 c d x+d^2 x^2\right )\right )}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 150, normalized size = 1.55
method | result | size |
derivativedivides | \(\frac {-\frac {a \left (f c \left (d x +c \right )-e d \left (d x +c \right )-\frac {f \left (d x +c \right )^{2}}{2}\right )}{d}-\frac {b \arctan \left (d x +c \right ) f c \left (d x +c \right )}{d}+b \arctan \left (d x +c \right ) e \left (d x +c \right )+\frac {b \arctan \left (d x +c \right ) f \left (d x +c \right )^{2}}{2 d}-\frac {b f \left (d x +c \right )}{2 d}+\frac {b \ln \left (1+\left (d x +c \right )^{2}\right ) f c}{2 d}-\frac {b \ln \left (1+\left (d x +c \right )^{2}\right ) e}{2}+\frac {b f \arctan \left (d x +c \right )}{2 d}}{d}\) | \(150\) |
default | \(\frac {-\frac {a \left (f c \left (d x +c \right )-e d \left (d x +c \right )-\frac {f \left (d x +c \right )^{2}}{2}\right )}{d}-\frac {b \arctan \left (d x +c \right ) f c \left (d x +c \right )}{d}+b \arctan \left (d x +c \right ) e \left (d x +c \right )+\frac {b \arctan \left (d x +c \right ) f \left (d x +c \right )^{2}}{2 d}-\frac {b f \left (d x +c \right )}{2 d}+\frac {b \ln \left (1+\left (d x +c \right )^{2}\right ) f c}{2 d}-\frac {b \ln \left (1+\left (d x +c \right )^{2}\right ) e}{2}+\frac {b f \arctan \left (d x +c \right )}{2 d}}{d}\) | \(150\) |
risch | \(-\frac {i b \left (f \,x^{2}+2 e x \right ) \ln \left (1+i \left (d x +c \right )\right )}{4}+\frac {i b f \,x^{2} \ln \left (1-i \left (d x +c \right )\right )}{4}+\frac {i b e x \ln \left (1-i \left (d x +c \right )\right )}{2}+\frac {a f \,x^{2}}{2}-\frac {\arctan \left (d x +c \right ) b \,c^{2} f}{2 d^{2}}+\frac {b c e \arctan \left (d x +c \right )}{d}+a e x +\frac {b c f \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right )}{2 d^{2}}-\frac {b e \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right )}{2 d}-\frac {b f x}{2 d}+\frac {\arctan \left (d x +c \right ) b f}{2 d^{2}}\) | \(175\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.47, size = 118, normalized size = 1.22 \begin {gather*} \frac {1}{2} \, a f x^{2} + \frac {1}{2} \, {\left (x^{2} \arctan \left (d x + c\right ) - d {\left (\frac {x}{d^{2}} + \frac {{\left (c^{2} - 1\right )} \arctan \left (\frac {d^{2} x + c d}{d}\right )}{d^{3}} - \frac {c \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )}{d^{3}}\right )}\right )} b f + a x e + \frac {{\left (2 \, {\left (d x + c\right )} \arctan \left (d x + c\right ) - \log \left ({\left (d x + c\right )}^{2} + 1\right )\right )} b e}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.52, size = 104, normalized size = 1.07 \begin {gather*} \frac {a d^{2} f x^{2} + 2 \, a d^{2} x e - b d f x + {\left (b d^{2} f x^{2} - {\left (b c^{2} - b\right )} f + 2 \, {\left (b d^{2} x + b c d\right )} e\right )} \arctan \left (d x + c\right ) + {\left (b c f - b d e\right )} \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )}{2 \, d^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [C] Result contains complex when optimal does not.
time = 1.82, size = 177, normalized size = 1.82 \begin {gather*} \begin {cases} a e x + \frac {a f x^{2}}{2} - \frac {b c^{2} f \operatorname {atan}{\left (c + d x \right )}}{2 d^{2}} + \frac {b c e \operatorname {atan}{\left (c + d x \right )}}{d} + \frac {b c f \log {\left (\frac {c}{d} + x - \frac {i}{d} \right )}}{d^{2}} - \frac {i b c f \operatorname {atan}{\left (c + d x \right )}}{d^{2}} + b e x \operatorname {atan}{\left (c + d x \right )} + \frac {b f x^{2} \operatorname {atan}{\left (c + d x \right )}}{2} - \frac {b e \log {\left (\frac {c}{d} + x - \frac {i}{d} \right )}}{d} + \frac {i b e \operatorname {atan}{\left (c + d x \right )}}{d} - \frac {b f x}{2 d} + \frac {b f \operatorname {atan}{\left (c + d x \right )}}{2 d^{2}} & \text {for}\: d \neq 0 \\\left (a + b \operatorname {atan}{\left (c \right )}\right ) \left (e x + \frac {f x^{2}}{2}\right ) & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.80, size = 136, normalized size = 1.40 \begin {gather*} a\,e\,x+\frac {a\,f\,x^2}{2}-\frac {b\,e\,\ln \left (c^2+2\,c\,d\,x+d^2\,x^2+1\right )}{2\,d}+\frac {b\,f\,\mathrm {atan}\left (c+d\,x\right )}{2\,d^2}+\frac {b\,f\,x^2\,\mathrm {atan}\left (c+d\,x\right )}{2}-\frac {b\,f\,x}{2\,d}+b\,e\,x\,\mathrm {atan}\left (c+d\,x\right )-\frac {b\,c^2\,f\,\mathrm {atan}\left (c+d\,x\right )}{2\,d^2}+\frac {b\,c\,f\,\ln \left (c^2+2\,c\,d\,x+d^2\,x^2+1\right )}{2\,d^2}+\frac {b\,c\,e\,\mathrm {atan}\left (c+d\,x\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________